﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:cal="http://www.caliburnproject.org" 
            xmlns:FlickrDownloadr_Controls="clr-namespace:FlickrDownloadr.Controls" 
            x:Class="FlickrDownloadr.Features.Search.SearchView" 
             mc:Ignorable="d" 
             d:DesignHeight="329" d:DesignWidth="665">
    <Grid>
            
    	<TextBox Margin="12,52,0,0" x:Name="SearchText" cal:Message.Attach="[Event KeyDown = [Action SearchKeyDown($eventArgs)]" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="20" HorizontalAlignment="Left" Width="273" />
    	<Button Content="Search" x:Name="Search" HorizontalAlignment="Left" Margin="291,52,0,0" Width="106" FontSize="18.667" Height="35" VerticalAlignment="Top"/>
    	<ComboBox HorizontalAlignment="Left" Margin="403,52,0,0" Width="78" FontSize="18.667" Height="35" VerticalAlignment="Top">
    		<ComboBoxItem Content="Text"/>
    		<ComboBoxItem Content="Tags"/>
    	</ComboBox>
        <RadioButton Content="Photos" x:Name="PhotosRadio" HorizontalAlignment="Left" Margin="14,18,0,0" VerticalAlignment="Top" Foreground="White" FontSize="20"/>
        <RadioButton Content="Groups" x:Name="GroupsRadio" Margin="99,18,0,0" VerticalAlignment="Top" Foreground="White" FontSize="20" HorizontalAlignment="Left" Width="108.634"/>
        <RadioButton Content="People" x:Name="PeopleRadio" Margin="214,18,0,0" VerticalAlignment="Top" Foreground="White" FontSize="20" HorizontalAlignment="Left"/>
        <ScrollViewer Margin="0,153,0,0">
            <ItemsControl x:Name="Results">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapPanel />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border Background="Black" BorderBrush="#88000000" BorderThickness="0.5">
                            <Image x:Name="DisplayPhoto" cal:Message.Attach="[Event MouseDown] = [Action DisplayPhoto($dataContext, $eventArgs)]" Source="{Binding SquareThumbnailUrl}" Width="75" Height="75" Stretch="Fill" ToolTip="{Binding Title}" />
                        </Border>
                    </DataTemplate>
                 </ItemsControl.ItemTemplate>
            </ItemsControl>
        </ScrollViewer>
        <FlickrDownloadr_Controls:CircularProgressBar x:Name="circularProgressBar1" Visibility="{Binding IsBusy, Converter={StaticResource boolToVisibility}}" Height="120" VerticalAlignment="Center" HorizontalAlignment="Center" Width="120" Margin="272,166,272,43" />
        <StackPanel Visibility="{Binding DisplayPreviewNavigation, Converter={StaticResource boolToVisibility}}" Margin="8,114.28,8,0" Height="34.72" VerticalAlignment="Top" Orientation="Horizontal">
        	<Button Content="&lt;" x:Name="MoveBack" Margin="0,4,4,0" Width="36"/>
        	<ComboBox x:Name="Pages" SelectedItem="{Binding CurrentPage, Mode=TwoWay}" Margin="0,4,4,0"/>
        	<TextBlock TextWrapping="Wrap" Text="of " Foreground="White" VerticalAlignment="Center"/>
        	<TextBlock x:Name="PageCount" Text="{Binding Results.Pages}" TextWrapping="Wrap" Foreground="White" VerticalAlignment="Center"/>
            <Button Content="&gt;" x:Name="MoveNext" Margin="0,4,10,0" Width="36"/>
            <ComboBox x:Name="ItemCount" Width="102" SelectedValue="{Binding NumberPerPage, Mode=TwoWay}" Margin="0,4,0,0" ToolTip="Number of photos to display per page" />
            <TextBlock x:Name="Status" FontSize="16" Foreground="#FFB4B4B4" TextWrapping="Wrap" VerticalAlignment="Center" TextAlignment="Center" Margin="6,0,0,0" />
        </StackPanel>
    </Grid>
</UserControl>
